import { createApp } from 'vue'
import router from './router'
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
import './assets/tailwindcss.css'
import App from './App.vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElIconList from '@element-plus/icons-vue'

const app = createApp(App)
const pinia = createPinia()
app.use(router)
app.use(pinia.use(piniaPluginPersist))

app.use(ElementPlus, { locale: zhCn })
for (const name in ElIconList) {
  app.component(name, ElIconList[name])
}

app.mount('#app')
